<div class="container">
    
    <?php $att = array('class' => 'form-horizontal', 'role' => 'form'); echo form_open('', $att);?>
    <div class="col-md-6">
        <div class="row">
            <div class="col-md-12">
              <div class="panel">
                <div id="pop_upload" style="position: absolute;width: 100%;height: 100%;z-index: 999;display: none">
                    <p style="text-align: center;width: 100%;height: 100%;background: #CCC;padding-top: 45%;color: #990000;font-size: 25px;">Đang upload ảnh ...</p>
                </div>
                <div class="panel-heading">
                  <div class="panel-title"> <img src="<?php echo $baseurl.'public/theme/default/img/change_password.png'?>" alt="user avatar" width="28" height="28" /> Đổi mật khẩu </div>
                </div>
                <div class="panel-body">
                    <?php if(isset($result) || validation_errors()):?>
                    <div class="alert alert-danger" id="show-msg">
                        <div class="btn-close"><button type="button" id="close-msg" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>
                             <?php if(@$result == 201){echo 'Có lỗi vui lòng thử lại';}else if(@$result == 200){echo 'Đổi mật khẩu thành công';};?>
                            <?php echo validation_errors(); ?>
                    </div>
                    <?php endif;?>
                    <div class="form-group">
                      <label for="inputStandard" class="col-lg-2 control-label">Mật khẩu cũ</label>
                      <div class="col-lg-10">
                        <input type="password" id="passwd" name="passwd" class="form-control" value="" placeholder="">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="inputPassword" class="col-lg-2 control-label">Mật khẩu mới</label>
                      <div class="col-lg-10">
                        <input type="password" class="form-control" id="passwd_new" name="passwd_new" value="" placeholder="">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="inputPassword" class="col-lg-2 control-label">Xác nhận mật khẩu mới</label>
                      <div class="col-lg-10">
                        <input type="password" class="form-control" id="re_passwd_new" name="re_passwd_new" value="" placeholder="">
                      </div>
                    </div>
                    
                </div>
              </div>
            </div>
        </div>
    </div>
    <div class="col-md-3-3">
        <div class="row">
            <div class="col-md-12">
                 <div class="panel">
                    <div class="panel-heading">
                      <div class="panel-title"><img src="<?php echo $baseurl.'public/theme/default/img/arrow_right.png'?>" alt="user avatar" width="28" height="28" /> Hành động</div>
                    </div>
                    <div class="panel-body">
                      <div class="form-group">
                          <div class="col-lg-10" style="width: 100%;">
                           
                            <button type="submit" class="btn btn-info btn-gradient btn-sm">Lưu lại</button>
                            <button type="button" class="btn btn-default btn-gradient btn-sm" onclick="window.location='<?php echo $baseurl.'user.html'?>'">Hủy bỏ</button>
                          </div>
                        </div>
                    </div>  
                 </div>
            </div>
        </div>
    </div>
    </form>
</div>
<script>
function convertimg()
{
    var chose = chose;
    var filesSelected = document.getElementById("img").files;
    if (filesSelected.length > 0)
    {
        var fileToLoad = filesSelected[0];

        var fileReader = new FileReader();

        fileReader.onload = function(fileLoadedEvent) 
        {
            var textAreaFileContents = document.getElementById
            (
                "textAreaFileContents"
                );
            $("#img_hidden").attr('value', fileLoadedEvent.target.result);
            $("#img_show").attr('src', fileLoadedEvent.target.result);
            
            
        };

        fileReader.readAsDataURL(fileToLoad);
    }
}

</script>